import { useEffect, useState } from 'react';
import { COUNTDOWN } from '@/constants';
import { useCountDown } from 'ahooks';
import {CustomStorage, session} from '@/utils/storage';

export const useRxCountDown = () => {
  const [leftTime, setLeftTime] = useState<number>(0);
  const [countdown] = useCountDown({
    leftTime,
    onEnd: () => {
      setLeftTime(0);
    },
  });
  return {
    leftTime,
    setLeftTime,
    countdown,
  };
};
